home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-09-28 | 1.3 KB | 59 lines | [TEXT/PJMM] |
- {P4/Mac port by Ingemar Ragenamlm 1994-1996}
- { Based on DumbEdit - Multiple-window TransEdit Demonstration.}
-
- program P4Edit;
-
- uses
- {$IFC UNDEFINED THINK_PASCAL}
- Types, QuickDraw, Windows, Dialogs, ToolUtils, Events, Controls, {}
- Memory, Sound, OSUtils, MixedMode,
- {$ENDC}
- TransEdit, TransSkel, TransDisplay, EditWindow, Run, Messages;
-
- const
- aboutAlrt = 1000;
- var
- pascalMenu: MenuHandle;
-
- procedure DoAbout;
- var
- ignore: integer;
- begin
- ignore := Alert(aboutAlrt, nil);
- end;
-
- { Initialize TransSkel, create menus and install handlers.}
-
- procedure DoPascalMenu (item: integer);
- begin
- case item of
- 1:
- Run;
- 3:
- Compile; {Compile to pcode}
- 4:
- RunPcode; {Run pcode}
- end; {case}
- end; {DoPascalMenu}
-
- begin
- SkelInit(6, nil);
-
- TransEditInit;
- SetEWindowCreator('p4’M'); {P4/Mac creator code}
-
- TransDisplayInit;
- SkelApple('About P4Mac…', @DoAbout);
-
- InitEditWindow;
- messagesWind := GetNewDWindow(128, WindowPtr(-1));
-
- pascalMenu := NewMenu(1005, 'Pascal');
- {DisableItem(pascalMenu, 0); <- SynchMenus borde aktivera denna när främsta fönstret är editförnster!}
- AppendMenu(pascalMenu, 'Compile and run/R;(-;Compile to pcode/M;Run pcode/G');
- if Skelmenu(pascalMenu, @DoPascalMenu, nil, true) then
- ;
-
- SkelMain;
- SkelClobber;
- end.